package com.ydl.learning.flink.demo.pipeline

import com.ydl.learning.flink.demo.pipeline.impl.{_}
import com.ydl.learning.flink.demo.pipeline.java.entity.JobConfig

/**
 *
 *
 * @author ydl
 * @since 2022/1/7
 */
object Demo2 extends App {
  val jobConfig: JobConfig = new JobConfig()
  jobConfig.setDefaultParallelism(2)
  jobConfig.setMaxParallelism(10)
  jobConfig.setJobName("pipelineDemo")
  jobConfig.set("host", "127.0.0.1")
  jobConfig.set("port", "9999")

  val pipeline: Pipeline2 = new Builder2()
    .jobConfig(jobConfig)
    .source(new Source2Impl)
    .process(new Process2Impl)
    .process(new BroadcastProcess2Impl)
    .sink(new Sink2Impl)
    .build
  pipeline.execute()

}
